package com.leetcode.no344;

public class Solution {
    public void reverseString(char[] s) {
        int len = s.length;
        int left = 0, right = len-1;

        while(left < right){
            swap(s, left, right);
            left++;
            right--;
        }
    }

    private void swap(char[] s, int i, int j){
        char t = s[i];
        s[i] = s[j];
        s[j] = t;
    }
}
